import { http } from '@/utils/http.js'

// 获取手机验证码
export const getMobileCMSAPI = (data) => {
	return http.get('/code',{params: data})
}

// 手机验证码登录
export const loginByCMSAPI = (data) => {
	return http.post('/login', data)
}

// 密码登录
export const loginByPasswordAPI = (data) => {
	return http.post('/login/password', data)
}

/**
 * 获取用户信息
 */
export const userInfoAPI = () => {
  return http.get('/patient/myUser')
}


/**
 * 问诊-添加患者信息
 */
export const addPatientAPI = (data) => {
	return http.post('/patient/add', data)
} 

/**
 * 问诊-查询患者列表信息
 */
export const getPatientListAPI = (data) => {
	return http.get('/patient/mylist')
}

/**
 * 问诊-删除患者信息
 */
export const deletePatientListAPI = (id) => {
	return http.delete(`/patient/del/${id}`)
}

/**
 * 问诊-查询患者详情
 */
export const getPatientDetailAPI = (id) => {
	return http.get(`/patient/info/${id}`)
}


/**
 * 问诊-编辑患者信息
 */
export const updatePatientAPI = (data) => {
	return http.put('/patient/update', data)
}